package com.wangshouyu.mp.message;

import com.thoughtworks.xstream.annotations.XStreamAlias;

import java.util.Objects;

/**
 * @author 王守钰
 * @date 2020年12月07日 10:59
 * @description 响应文本消息
 */
@XStreamAlias("xml")
public class ResponseTextMessage extends BaseMessage{

    /**
     * 响应文本
     */
    @XStreamAlias(value = "Content")
    private String content;

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        ResponseTextMessage that = (ResponseTextMessage) o;
        return Objects.equals(content, that.content);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), content);
    }

    @Override
    public String toString() {
        return "ResponseTextMessage{" +
                "content='" + content + '\'' +
                '}';
    }
}
